package com.ailesson.video.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ailesson.common.reply.PageResult;
import com.ailesson.video.entity.ChapterEntity;
import com.ailesson.video.model.req.ChapterQueryReq;
import com.ailesson.video.model.req.ChapterReq;
import com.ailesson.video.model.reply.ChapterReply;

import java.util.List;

/**
 * 课程章节
 *
 * @author mac
 * @email mac@gmail.com
 * @date 2024-10-02 10:30:59
 */
public interface ChapterService extends IService<ChapterEntity> {

    /**
     * 分页查询
     * @param params
     * @return
     */
    PageResult queryPage(ChapterQueryReq params);

    /**
     * 查询信息
     * @param id
     * @return
     */
    ChapterReply info(Long id);

    /**
     * 更新信息
     * @param chapter
     */
    void update(ChapterReq chapter);

    /**
     * 新增
     * @param chapter
     */
    Long add(ChapterReq chapter);

    void deleteByCourseId(Long id);

    List<ChapterReply> getTreeList(Long courseId);
}

